﻿using System;
using System.Threading;

namespace Black_Jack
{
    public class Card
    {
        private int i;
        public int k;
        public int[] deck = new int[36];
        public int nam;
        public int[] deckCard = new int[9];

        public void kons()
        {
            for (int i = 0; i < 36; i++)
            {
                deck[i] = i;
            }
        }


        public int karta()
        {
            int k = 0, i = 0;
            for (int q = 0; q < 9; q++)
            {
                deckCard[q] = 0;
            }
            kons();
            i = 0;
            while (i < 9)
            {
                Thread.Sleep(1);
                var rand = new Random();
                k = rand.Next(0, 35);
                if (deck[k] < 36)
                {
                    deckCard[i] = k;
                    deck[k] = 100;
                    i++;
                }
            }
            return k;
        }
    }
}